home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / Aidan's Class Libraries / Source / Headers / CLWindowLayer.h < prev    next >
Encoding:
Text File  |  1997-07-20  |  1.2 KB  |  47 lines  |  [TEXT/CWIE]

  1. //Copyright (c) 1997 Aidan Cully
  2. //All rights reserved
  3.  
  4. #ifndef __WINDOWLAYER_H
  5. #define __WINDOWLAYER_H
  6.  
  7. #include "CLList.h"
  8. #include "CLBackgrounder.h"
  9. #include <QuickDraw.h>
  10.  
  11. class TBaseWindow;
  12.  
  13. class TWindowLayer:
  14.     public MBackgrounder
  15. {
  16. protected:
  17.     bool mActive;
  18.     static TWindowLayer *sFrontLayer;
  19.     TList<TBaseWindow*> mhWindows;
  20.     TWindowLayer *mBelow, *mAbove;
  21.     virtual bool CalcMouseMoveBelow( Point, RgnHandle );
  22.     virtual TBaseWindow *FindLastWindowAbove();
  23. public:
  24.     TWindowLayer();
  25.     virtual ~TWindowLayer();
  26.     virtual void AddWindow( TBaseWindow* );
  27.     virtual void RemoveWindow( TBaseWindow* );
  28.     virtual TBaseWindow *FindWindow( Point );
  29.     virtual void CalcMouseMove( Point, RgnHandle );
  30.     virtual TBaseWindow *FrontWindow();
  31.     static TWindowLayer *FrontLayer();
  32.     virtual void SelectWindow( TBaseWindow* );
  33.     virtual void SendBehind( TBaseWindow*, TBaseWindow* );
  34.     virtual void AddLayer( TWindowLayer* );
  35.     bool IsActive() {return( mActive );};
  36.     virtual void MakeActive( bool );
  37.     virtual void HandleBackground( const TBackgroundEvent* );
  38. };
  39.  
  40. extern TWindowLayer *gNormalWindowLayer, *gFloatingWindowLayer;
  41.  
  42. inline TWindowLayer *TWindowLayer::FrontLayer()
  43. {
  44.     return( sFrontLayer );
  45. }
  46.  
  47. #endif